﻿using System;
using Microsoft.SharePoint.Client.Services;
using System.ServiceModel;
using System.ServiceModel.Activation;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;

namespace CodeCounsel.SharePoint.NavigationService
{
    public class NavigationApplicationHostFactory
        : MultipleBaseAddressBasicHttpBindingServiceHostFactory 
    {
        public override ServiceHostBase CreateServiceHost(
            string constructorString, Uri[] baseAddresses)
        {
            ServiceHost host = new ServiceHost(
                typeof(NavigationApplication), 
                baseAddresses);
            host.Configure(SPServiceAuthenticationMode.Claims);
            return host;
        }
    }
}
